<?php

	if(!isset($IMAGES))	{
		echo "<h1>Falta definir el array de imagenes";
	}
	if(!isset($PROYECT_NAME))	{
		echo "<h1>Falta definir el nombre del proyecto";
	}
	if(!isset($BACKGROUND_COLOR))	$BACKGROUND_COLOR 	= "000000";
	
	$IS_LOCALHOST = in_array($_SERVER['HTTP_HOST'], array('localhost', '127.0.0.1'));
	if($IS_LOCALHOST){
		$BASE_URL = "http://localhost/kazuu/";
	}else{
		$BASE_URL = "http://www.kazuu.com.ar/";
	}
	
	if(!isset($_GET["image"])) $_GET["image"] = 0;
	if($_GET["image"] >= sizeof($IMAGES)) $_GET["image"] = 0;
	
	$nextNumImage 	= ($_GET["image"] + 1 >= sizeof($IMAGES)) ? 0 : $_GET["image"] + 1;
	$currentImage 	= $IMAGES[$_GET["image"]];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="es">
	<head>
		<!--

		<?php echo $PROYECT_NAME; ?> | Designs

		..
		2012 © Kazuu
		www.kazuu.com.ar

		-->
		<title><?php echo $PROYECT_NAME; ?> | Designs</title>
		
		<meta name="robots" content="none, notfollow" />
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        
		<link rel="author" href="http://www.kazuu.com.ar/" />
		<link rel="shortcut icon" href="http://www.kazuu.com.ar/website/content/icon.ico" />
		<link rel="icon" href="http://www.kazuu.com.ar/website/content/icon.ico" />
		<link rel="image_src" href="http://www.kazuu.com.ar/website/content/img-media.jpg" />
		<link rel="apple-touch-icon" href="http://www.kazuu.com.ar/website/content/apple-touch-icon-128x128.png"/>
		<link rel="stylesheet" type="text/css" href="<?php echo $BASE_URL; ?>clients/lmpropiedades/website/frontend/design/design-viewer/css/reset.css" />
		<link rel="stylesheet" type="text/css" href="<?php echo $BASE_URL; ?>clients/lmpropiedades/website/frontend/design/design-viewer/css/layout.css" />
        
		<script type="text/javascript" src="<?php echo $BASE_URL; ?>clients/lmpropiedades/website/frontend/design/design-viewer/js/layout.js"></script>
	</head>
	<body bgcolor="#<?php echo $BACKGROUND_COLOR; ?>">
    	<div id="loading">
			<span>Cargando Imagenes</span>
        </div>
        <?php if(sizeof($IMAGES) > 1){ ?>
    	<a href="?image=<?php echo $nextNumImage; ?>">
        <?php } ?>
        	<img id="img-design" src="<?php echo $currentImage; ?>" alt="<?php echo $PROYECT_NAME; ?>" />
        <?php if(sizeof($IMAGES) > 1){ ?>
		</a>
        <?php } ?>
	</body>
</html>